<?php
/*cech*/
  $ced=$_POST['id'];
    $nom=$_POST['nombre'];
    require '../GestionPermisos/conn.php';
    /*if ExisteRegistro("tb01docu", "NUDO",$factura,"A") then
    {*/
   
    $SQLstr ="INSERT INTO `bt07_rutas` 
            (`BT07CORU`,`BT07DERU`) 
            VALUES('{$ced}','{$nom}')";

    if (!$mysqli->query($SQLstr))
    {
         echo'<script language=javascript>
        alert("Codigo de Ruta ya existe")
        self.location="mt01.php"
      </script>';
    }    
    else
    {
      header('index.php');
          echo'<script language=javascript>
        alert("Ruta ingresada")
        self.location="index.php"
      </script>';
    }
    require('mt01.php');
    $mysqli->close();
?>

